// Stack.h: interface for the CStack class.
//
//////////////////////////////////////////////////////////////////////

#include <Afxtempl.h>
#if !defined(AFX_STACK_H__A94CE3DF_D896_4E71_AD3C_915175E545FA__INCLUDED_)
#define AFX_STACK_H__A94CE3DF_D896_4E71_AD3C_915175E545FA__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CStack : public CObject  
{
public:
	CStack();
	virtual ~CStack();

private:
//node of stack	
	typedef struct _tagstackdt
	{
		struct _tagstackdt *ptonext;
		int sdata;
	}stackdt;
//header of stack	
	typedef struct _tagstackh
	{
		struct _tagstackdt *ptostack;
		long length;
	}stackh;

//initiate
	stackh *data;

//operator
public:
	void Push(int i);
	int Pop();
	int GetLength();
	BOOL isEmpty();
};

#endif // !defined(AFX_STACK_H__A94CE3DF_D896_4E71_AD3C_915175E545FA__INCLUDED_)
